<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="java.sql.*" %>


<%@ page import="com.dts.core.dao.*,com.dts.core.model.*,com.dts.dae.dao.*,com.dts.dae.model.*,com.dts.btisqr.dao.*,com.dts.btisqr.model.*"%>
<%@ page import="com.dts.core.util.*,java.util.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'DeleteProjectAction.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <%
  Connection con=null;
PreparedStatement pstmt=null;

   String target="ViewMembers.jsp?header=list";
      try{
		  System.out.println(" mmmmmmmmmmmmmm");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");                con=DriverManager.getConnection("jdbc:odbc:bug","bug","bug");
            String ch[] = request.getParameterValues("ch");
		//	System.out.println(con+"kkkkk"+ch.length);
 
		   //System.out.println(pstmt+"kkkk"+ch.length);
            for(int i=1;i<ch.length;i++)
            {
				System.out.println(ch[i]);
			pstmt=con.prepareStatement("delete from logindetails where loginname=?");
                pstmt.setString(1,ch[i]);
				pstmt.executeUpdate();
            }
			
         }
         catch(Exception e)
         {
 			e.printStackTrace();
           LoggerManager.writeLogWarning(e);
         }
         response.sendRedirect(target);
		 pstmt.close();
		 con.close();
     %>
  </body>
</html>
